#include<stdio.h>
int main()
{
    int	n,a;
    scanf("%d",&n);
    for(a=0;n>0;n=n/2)
	{
		if(n%2==1)
		a++; 
	 } 
	 printf("%d",a);
	 return 0;
}
